import request from '@/utils/request'

export default {

    insert(permission) {
        return request({
            url: `/changgou-sys/sys/permission/insert`,
            method: 'post',
            data: permission
        })
    },
    update(permission) {
        return request({
            url: `/changgou-sys/sys/permission/update`,
            method: 'post',
            data: permission
        })
    },
    getPageList(pageNum, pageSize, key) {
        return request({
            url: `/changgou-sys/sys/permission/queryPageList?pageNum=${pageNum}&pageSize=${pageSize}&key=${key}`,
            method: 'get'
        })
    },
    delete(id) {
        return request({
            url: `/changgou-sys/sys/permission/delete/${id}`,
            method: 'delete'
        })
    }
}
